// 设计器全局样式
.template-designer-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f8f8f8;
  
  .designer-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    
    .center-panel {
      flex: 1;
      padding: 20px;
      position: relative;
      overflow: auto;
      background-color: #f8f8f8;
      
      .canvas-wrapper {
        position: relative;
        margin: 0;
      }
    }
  }
}

// 预览容器样式
.preview-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 10px;
  
  .preview-image {
    max-width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #dcdfe6;
  }
}

// 通用样式变量
:root {
  --primary-color: #409eff;
  --success-color: #67c23a;
  --warning-color: #e6a23c;
  --danger-color: #f56c6c;
  --info-color: #909399;
  
  --text-primary: #303133;
  --text-regular: #606266;
  --text-secondary: #909399;
  
  --border-color: #dcdfe6;
  --border-light: #e4e7ed;
  --background-light: #f5f7fa;
  
  --panel-padding: 10px;
  --section-margin: 15px;
}

// 功能性动画
@keyframes scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.scale-animation {
  animation: scale 0.3s ease-in-out;
}

// 画布和刻度尺区域共享样式
.canvas-area {
  position: relative;
  background-color: #f8f8f8;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

// 右侧面板通用样式 
.right-panel {
  width: 430px;
  background-color: #f5f7fa;
  border-left: 1px solid #e4e7ed;
  overflow-y: auto;
}

// 面板项目通用样式
.panel-item {
  margin-bottom: 15px;
  padding: 5px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  
  .panel-title {
    margin: 0 0 5px 0;
    padding: 5px;
    background-color: #e4e7ed;
    font-weight: bold;
    font-size: 14px;
    color: #606266;
    border-radius: 3px;
  }
  
  .panel-content {
    padding: 8px;
  }
}

// 文本和提示信息样式
.warning-tip {
  font-size: 12px;
  color: #e6a23c;
  margin: 5px 0;
  padding: 5px;
  background-color: #fdf6ec;
  border-radius: 3px;
}

.info-tip {
  font-size: 12px;
  color: #909399;
  margin: 5px 0;
}

// 工具栏样式
.toolbar {
  padding: 10px;
  background-color: #f5f7fa;
  border-bottom: 1px solid #e4e7ed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 50px;
  
  .button-group {
    display: flex;
    gap: 10px;
  }
}

// 画布容器
.canvas-container {
  position: relative;
  background: white;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  outline: 1px solid #e4e7ed;
  z-index: 5;
  
  &.canvas-dragging {
    outline: 2px dashed var(--primary-color);
  }
}

// 画布背景扩展区域
.canvas-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #f8f8f8;
  z-index: 2;
}

// 辅助线和网格
.grid-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: linear-gradient(#ddd 1px, transparent 1px),
                    linear-gradient(90deg, #ddd 1px, transparent 1px);
  background-size: 10px 10px;
  opacity: 0.3;
  pointer-events: none;
}

// 响应式调整
@media (max-width: 1200px) {
  .right-panel {
    width: 350px;
  }
}

@media (max-width: 992px) {
  .designer-content {
    flex-direction: column;
    
    .right-panel {
      width: 100%;
      height: 300px;
      border-left: none;
      border-top: 1px solid #e4e7ed;
    }
  }
} 